{% extends 'base.html' %}

{% block title %}添加种植数据{% endblock %}

{% block content %}
<div class="card">
    <div class="card-header bg-primary text-white">
        <h4 class="mb-0">添加种植数据</h4>
    </div>
    <div class="card-body">
        <form method="post">
            <div class="row">
                <div class="col-md-6 mb-3">
                    <label for="crop_type" class="form-label">作物类型</label>
                    <input type="text" class="form-control" id="crop_type" name="crop_type" required>
                </div>
                <div class="col-md-6 mb-3">
                    <label for="area" class="form-label">种植面积(亩)</label>
                    <input type="number" step="0.01" class="form-control" id="area" name="area" required>
                </div>
                <div class="col-md-6 mb-3">
                    <label for="region" class="form-label">种植区域</label>
                    <input type="text" class="form-control" id="region" name="region" required>
                </div>
                <div class="col-md-6 mb-3">
                    <label for="plot_number" class="form-label">地块编号</label>
                    <input type="text" class="form-control" id="plot_number" name="plot_number">
                </div>
                <div class="col-md-6 mb-3">
                    <label for="planting_date" class="form-label">种植日期</label>
                    <input type="date" class="form-control" id="planting_date" name="planting_date" required>
                </div>
            </div>
            <div class="mt-3">
                <button type="submit" class="btn btn-primary">保存</button>
                <a href="{{ url_for('data.planting_list') }}" class="btn btn-secondary">返回</a>
            </div>
        </form>
    </div>
</div>
{% endblock %} 